<<<<<<< HEAD
<!--  -->
<template>
  <el-container>
    <!-- 查询 -->
    <el-header>
      关键字:<el-input
        class="search"
        type="text"
        size="mini"
        @change="selects()"
        placeholder="请输入内容"
        v-model="text"
      ></el-input>
      订单状态:<el-select
        size="mini"
        @change="selects()"
        class="search"
        v-model="value"
        placeholder="请选择"
      >
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          @change="selects()"
          :value="item.value"
        >
        </el-option>
      </el-select>
      <el-date-picker
        v-model="values"
        size="mini"
        type="daterange"
        @change="selects()"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
      >
      </el-date-picker
      ><br />
      所属站点:<el-select
        size="mini"
        @change="selects()"
        class="search"
        v-model="zhandian"
        placeholder="请选择"
      >
        <el-option
          v-for="item in zhandianArr"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>
    </el-header>

    <el-main>
      <el-row>
        <el-button type="danger" plain @click="psyDelBut()">删除</el-button>
        <el-button type="info" plain>导出</el-button>
      </el-row>
      <Maintable class="dingdan" :tableData="psdingdanArr">
        <template v-slot:tableline>
          <el-table-column prop="order_id" label="订单编号" width="100"> </el-table-column>
          <el-table-column prop="commodity_name" label="货物类别" width="80"> </el-table-column>
          <el-table-column prop="commodity_num" label="商品数量" width="80"> </el-table-column>
          <el-table-column prop="boxes" label="箱数" width="60"> </el-table-column>
          <el-table-column prop="money" label="金额" width="60"> </el-table-column>
          <el-table-column prop="weight" label="重量" width="60"> </el-table-column>
          <el-table-column prop="state" label="订单状态" width="80"
            ><template slot-scope="scope">
              {{
                scope.row.state == 0
                  ? "待审核"
                  : scope.row.state == 1
                  ? "待取货"
                  : scope.row.state == 2
                  ? "待送货"
                  : scope.row.state == 3
                  ? "签收成功"
                  : scope.row.state == 4
                  ? "签收失败"
                  : scope.row.state == 5
                  ? "待分配"
                  : "审核失败"
              }}
            </template>
          </el-table-column>
          <el-table-column prop="coname" label="收件人" width="80"> </el-table-column>
          <el-table-column prop="phone" label="联系方式" width="120"> </el-table-column>
          <el-table-column prop="name" label="配送人" width="80"> </el-table-column>
          <el-table-column prop="dispatch_time" label="配送时间" width="100"> </el-table-column>
          <el-table-column prop="commodity_name" label="时效产品" width="80"> </el-table-column>
          <el-table-column prop="site_name" label="所属站点" width="80"> </el-table-column>
        </template>
        <template v-slot:chaozuo>
          <el-table-column label="操作">
            <template slot-scope="scope">
              <el-button
                type="success"
                slot="reference"
                plain
                icon="el-icon-view"
                title="查看"
                @click="updates(scope.row.id)"
              >
              </el-button>
            </template>
          </el-table-column>
        </template>
      </Maintable>
    </el-main>
    <el-footer>
      <div class="block">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="currentPage"
          :page-sizes="[6, 8, 10, 12]"
          :page-size="100"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
        >
        </el-pagination>
      </div>
    </el-footer>
  </el-container>
</template>

<script>
// import Mainsearch from "../components/main/mainsearch";
import Maintable from "../components/main/Maintable";
export default {
  name: "Mianpaisongdingdan",
  components: {
    // Mainsearch,
    Maintable,
  },
  computed: {},
  data() {
    return {
      text: "",
      size: 6,
      page: 1,
      total: 0,
      currentPage: 1,
      visible: false,
      zhandian: "",
      zhandianArr: JSON.parse(window.localStorage.getItem("allzhandianArr")),
      psdingdanArr: [],
      options: [
        {
          value: "",
          label: "未选择",
        },
        {
          value: 1,
          label: "正常",
        },
        {
          value: 0,
          label: "冻结中",
        },
      ],
      value: "",
      values: "",
      startdispatch_time: "",
      enddispatch_time: "",
    };
  },
  methods: {
    //批量删除
    batch() {
      var Arr = JSON.parse(window.localStorage.getItem("val"));
      // console.log(Arr);
      this.$axios({
        method: "post",
        url: "/xiaoucomeshome_war/usermanager/deleteUserManagerByOrderIdAll",
        data: Arr,
      })
        .then((res) => {
          // console.log(res);
          // this.tableData = res.data.data;
        })
        .catch((err) => {
          console.log(err);
        });
      setTimeout(this.selects, 100);
    },
    handleSizeChange(val) {
      this.size = val;
      console.log(`每页 ${val} 条`);
      this.selects();
    },
    handleCurrentChange(val) {
      this.page = val;
      console.log(`当前页: ${val}`);
      this.selects();
    },
    updates(id) {
      console.log(id);
    },
    psyDelBut() {
      this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "删除成功!",
          });
          this.batch();
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    //获取页面数据
    selects() {
      // this.startdispatch_time = this.values[0].toLocaleDateString();
      // this.enddispatch_time = this.values[1].toLocaleDateString();
      console.log(this.values);
      // console.log(this.text);
      this.$axios({
        method: "post",
        url: "/xiaoucomeshome_war/usermanager/selectUserByNameAndPhone",
        data: {
          state: this.value,
          site_id: this.zhandian,
          // enddispatch_time: this.enddispatch_time,
          // startdispatch_time: this.startdispatch_time,
          all: this.text,
          page: this.page,
          size: this.size,
        },
      })
        .then((response) => {
          this.total = response.data.total;
          this.psdingdanArr = response.data.data;
          console.log(response.data);
        })
        .catch((error) => {
          console.log(error);
        });
    },
  },
  mounted() {
    this.selects();
  },
};
</script>

<style lang="less" scoped>
.el-dropdown-link {
  cursor: pointer;
  color: #409eff;
}
.block {
  margin: 0 130px;
  float: right;
}
.el-icon-arrow-down {
  font-size: 12px;
}

.search {
  margin: 10px 40px 0 20px;
  width: 20%;
}
.el-table {
  font-size: 12px;
}
.searchs {
  margin: auto;
  width: 68%;
}
</style>
=======
<!--  -->
<template>
  <el-container>
    <!-- 查询 -->
    <el-header>
      关键字:<el-input
        class="search"
        type="text"
        size="mini"
        @change="selects()"
        placeholder="请输入内容"
        v-model="text"
      ></el-input>
      订单状态:<el-select size="mini" class="search" v-model="value" placeholder="请选择">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>
      <el-date-picker
        v-model="values"
        size="mini"
        type="daterange"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
      >
      </el-date-picker>
      所属站点:<el-select size="mini" class="search" v-model="zhandianArr" placeholder="请选择">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        >
        </el-option>
      </el-select>
    </el-header>

    <el-main>
      <el-row>
        <el-button type="danger" plain @click="psyDelBut()">删除</el-button>
        <el-button type="info" plain>导出</el-button>
      </el-row>
      <Maintable class="dingdan" :tableData="psdingdanArr">
        <template v-slot:tableline>
          <el-table-column prop="number" label="订单编号" width="100"> </el-table-column>
          <el-table-column prop="huowu" label="货物类别" width="80"> </el-table-column>
          <el-table-column prop="spnb" label="商品数量" width="80"> </el-table-column>
          <el-table-column prop="boxnb" label="箱数" width="60"> </el-table-column>
          <el-table-column prop="money" label="金额" width="60"> </el-table-column>
          <el-table-column prop="havry" label="重量" width="60"> </el-table-column>
          <el-table-column prop="ordersta" label="订单状态" width="80"> </el-table-column>
          <el-table-column prop="sjr" label="收件人" width="80"> </el-table-column>
          <el-table-column prop="phone" label="联系方式" width="120"> </el-table-column>
          <el-table-column prop="psr" label="配送人" width="80"> </el-table-column>
          <el-table-column prop="peisj" label="配送时间" width="100"> </el-table-column>
          <el-table-column prop="pro" label="时效产品" width="80"> </el-table-column>
          <el-table-column prop="name" label="所属站点" width="80"> </el-table-column>
        </template>
        <template v-slot:chaozuo>
          <el-table-column label="操作">
            <template slot-scope="scope">
              <el-button
                type="success"
                slot="reference"
                plain
                icon="el-icon-view"
                title="查看"
                @click="updates(scope.row.id)"
              >
              </el-button>
            </template>
          </el-table-column>
        </template>
      </Maintable>
    </el-main>
  </el-container>
</template>

<script>
// import Mainsearch from "../components/main/mainsearch";
import Maintable from "../components/main/Maintable";
export default {
  name: "Mianpaisongdingdan",
  components: {
    // Mainsearch,
    Maintable,
  },
  computed: {},
  data() {
    return {
      text: "",
      visible: false,
      zhandianArr: [],
      psdingdanArr: [],
      options: [
        {
          value: "选项1",
          label: "正常",
        },
        {
          value: "选项2",
          label: "冻结中",
        },
      ],
      value: "",
      values: "",
    };
  },
  methods: {
    updates(id) {
      console.log(id);
    },
    psyDelBut() {
      this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "删除成功!",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    deletes(id) {
      console.log(id);
      // this.$axios({
      //   method: "post",
      //   url: "http://",
      //   data: { id },
      // }).then((data) => {
      //   // arr=data.toArray;
      // });
    },
    //批量删除
    batch() {
      var Arr = JSON.parse(window.localStorage.getItem("val"));
      // console.log(Arr);
      this.$axios({
        method: "post",
        url: "/xiaoucomeshome_war/admin/courierDelete",
        data: Arr,
      })
        .then((res) => {
          // console.log(res);
          // this.tableData = res.data.data;
        })
        .catch((err) => {
          console.log(err);
        });
      this.selects();
    },
    //获取页面数据
    selects() {
      // console.log(this.text);
      this.$axios({
        method: "post",
        url: "/xiaoucomeshome_war/admin/selectCourier",
        data: {
          state: this.value,
          enddispatch_time: this.values[1].toLocaleDateString(),
          startdispatch_time: this.values[0].toLocaleDateString(),
          phone: this.text,
          page: 1,
          size: 8,
        },
      })
        .then((response) => {
          this.psdingdanArr = response.data.data;
          console.log(response.data);
        })
        .catch((error) => {
          console.log(error);
        });
    },
    mounted() {
      this.selects();
    },
  },
};
</script>

<style lang="less" scoped>
.el-dropdown-link {
  cursor: pointer;
  color: #409eff;
}

.el-icon-arrow-down {
  font-size: 12px;
}

.search {
  margin: 10px 40px 0 20px;
  width: 20%;
}
.el-table {
  font-size: 12px;
}
.searchs {
  margin: auto;
  width: 68%;
}
</style>
>>>>>>> ae27e4fe2d4f939d0b0ee2bfa506b9e3269c53cb
